<?python
   from mnemoply.utils import date2str_points
   def getTeacherName(group, date):
       assistant_type = model.LessonAssistantType.selectBy(stringId='default_lesson')[0]
       sl = model.SpentLesson.selectBy(date=date, group=obj, lessonAssistantType=assistant_type)
       if sl.count():
           return sl[0].teacher.title
       return ''
?>
<span xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/">
  <div style="height: 350px; overflow-y: scroll;">
    <table>
      <tr><th>Date</th><th>Topic</th><th>Teacher</th></tr>
      <tr py:for="lesson in obj.getLessons()">
        <td py:content="date2str_points(lesson.date)" />
        <td py:content="lesson.gtopic.title" />
        <td py:content="getTeacherName(obj, lesson.date)"></td>
      </tr>
    </table>
  </div>
</span>

